﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 纸片人.win2dEffectControl.DataClass;

using 纸片人.CalculateControls;
namespace 纸片人.win2dEffectControl
{
    public class HighLightRevealEffectControl : EffectControl
    {

        private Vector2Control pointVector2Control;
        private TextBoxSlider radiusTextBoxSlider;

        public HighLightRevealEffectControl()
        {
            this.DefaultStyleKey = typeof(HighLightRevealEffectControl);
            OneEffetData = new HighLightRevealEffectData();
        }

        public override EffectOneSourceData OneEffetData { get; set; }

        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
            SetEffectName("高光效果：", "HighLightRevealEffect");

            pointVector2Control = GetTemplateChildFormName<Vector2Control>(nameof(pointVector2Control));
            SetVector2Control(pointVector2Control, OneEffetData, nameof(HighLightRevealEffectData.Point));

            radiusTextBoxSlider = GetTemplateChildFormName<TextBoxSlider>(nameof(radiusTextBoxSlider));
            SetTextBoxSlider(radiusTextBoxSlider, OneEffetData, nameof(HighLightRevealEffectData.Radius));
        }


    }
}

